<?php
    // 这个接口用于更新指定id的记录

    include_once '../../fn.php';

    $id = $_POST['id'];
    $email = $_POST['email'];
    $slug = $_POST['slug'];
    $nickname = $_POST['nickname'];
    $password = $_POST['password'];

    $sql = "update users SET slug='$slug',email='$email',password='$password',nickname='$nickname' WHERE id=$id;";

    $result = my_exec($sql);

    echo json_encode($result);
?>